/** @format */

import axios from '@/utils/request'
// import qs from 'qs'

// 登录
export function sysLogin(data) {
  return axios.post('/sys/login', data)
}
// 退出登录
export function sysLogout(data) {
  return axios.post('/sys/logout', data)
}
// 新增系统配置
export function addSetting(data) {
  return axios.post('/sys/setting/add', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}
// 编辑系统配置
export function settingEdit(data) {
  return axios.put('/sys/setting/edit', data)
}
// 系统配置-列表查询
export function settinglist(data) {
  return axios.get('/sys/setting/list', { data: data })
}
// 获取系统服务设置
export function getServiceSettings(data) {
  return axios.post('/sys/common/getServiceSettings', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}
// 修改系统服务设置
export function editServiceSettings(data) {
  return axios.post('/sys/common/editServiceSettings', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}

// 是否开启容量统计
export function capacityStatistics() {
  return axios.get('/sys/setting/capacityStatistics')
}
// 密保表-列表查询
export function confidentialityProtectionList(data) {
  return axios.get('/sys/confidentialityProtection/list', { params: { accountId: data } })
}
// 密保表-查询问题
export function getProblemList(data) {
  return axios.get('/sys/confidentialityProtection/getProblemList', { params: { loginName: data } })
}
// 密保表-验证问题
export function verification(data) {
  return axios.post('/sys/confidentialityProtection/verification', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}
// 新增或修改密保表
export function confidentialityProtectionaddOrEdit(data) {
  return axios.post('/sys/confidentialityProtection/addOrEdit', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}
// 密保问题重置密码
export function resetPasswordByProblem(data) {
  return axios.put('/sys/account/resetPasswordByProblem', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}
